import 'package:color_dart/HexColor.dart';
import 'package:color_dart/RgbaColor.dart';
import "package:flutter/material.dart";
import 'package:im_flutter_sdk_example/components/a_button/index.dart';
import 'package:im_flutter_sdk_example/utils/global.dart';

import 'widgets/select_swiper.dart';

class InterestSelect extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    double height = G.screenHeight();
    double paddingTop = 60;
    double interestTagHeight = (height - paddingTop) / 2;
    return Container(
      color: Colors.red,
      padding: EdgeInsets.only(top: 60, left: 20, right: 20),
      height: interestTagHeight,
      child: Column(
        crossAxisAlignment: CrossAxisAlignment.start,
        children: [
          Padding(
            padding: const EdgeInsets.all(8.0),
            child: Stack(
              children: [
                Positioned(
                  child: Image.asset('lib/assets/images/doublequotation.png',
                      width: 40, height: 40),
                ),
                Positioned(
                  child: Padding(
                    padding: const EdgeInsets.only(top: 20),
                    child: Text(
                      '请选择您感兴趣的领域',
                      style: TextStyle(
                          fontSize: 22,
                          fontWeight: FontWeight.bold,
                          decoration: TextDecoration.none,
                          color: rgba(51, 51, 51, 1)),
                    ),
                  ),
                ),
              ],
            ),
          ),
          Padding(
            padding: const EdgeInsets.symmetric(vertical: 30),
            child: SelectSwiper(height: interestTagHeight),
          ),
          Container(
            padding: EdgeInsets.symmetric(horizontal: 20),
            margin: EdgeInsets.only(top: 10),
            child: AButton.normal(
                width: double.infinity,
                child: Text('确定'),
                color: hex('#fff'),
                bgColor: rgba(42, 125, 250, 1),
                borderColor: rgba(136, 175, 213, 1),
                onPressed: () => G.pushNamed('/index')),
          ),
          Container(
            padding: EdgeInsets.symmetric(horizontal: 20),
            margin: EdgeInsets.only(top: 25),
            child: AButton.normal(
                width: double.infinity,
                plain: true,
                child: Text('跳过'),
                color: rgba(136, 135, 135, 1),
                bgColor: Colors.transparent,
                onPressed: () => G.pushNamed('/index')),
          ),
        ],
      ),
    );
  }
}
